<div class="bjui-pageHeader">
    <ul class="nav nav-tabs" role="tablist">
        <li class="active"><a href="#pro_home" role="tab" data-toggle="tab">基本信息</a></li>
        <li><a href="{:U('Forms/proone',array('id'=>$va['id']))}" role="tab" data-toggle="ajaxtab" data-target="#pro_content" data-reload="false">详情介绍</a></li>
        <li><a href="{:U('Forms/protwo',array('id'=>$va['id']))}" role="tab" data-toggle="ajaxtab" data-target="#pro_attr" data-reload="false">模型参数</a></li>
       <!--  <li><a href="{:U('Forms/prothree',array('id'=>$va['id']))}" role="tab" data-toggle="ajaxtab" data-target="#pro_aftersale" data-reload="false">售后</a></li> -->
    </ul>
</div>
<div class="bjui-pageContent">
    <form action="{:U('save_goods')}"  data-toggle="validate" data-alertmsg="false" class="navtabForm">
        <input type="hidden" name="id" value="{$va.id}"/>
        <div class="tab-content">
            <div class="tab-pane fade active in" id="pro_home">
                <div class="form-group">
                    <label class="x100">产品名称:</label>
                    <input type="text" name=name data-rule="required" value="{$va.name}"/>
                </div>
                <div class="form-group">
                    <label class="x100">副标题:</label>
                    <textarea name="two_name" class="w400">{$va.two_name}</textarea>
                </div>
                <div class="form-group">
                    <label class="x100">产品货号:</label>
                    <input type="text" name="goods_no" data-rule="required" value="<php>echo $va['goods_no']?$va['goods_no']:goods_no()</php>"/>
                </div>
                <div class="form-group">
                    <label class="x100">价格:</label>
                    <input type="text" name="price" data-rule="required" value="{$va.price}"/>元
                </div>
                <div class="form-group">
                    <label class="x100">所属类型:</label>
                    <select name="commend_id" data-toggle="selectpicker" data-nextselect="#groy-type2" data-refurl="{:U('Index/getclass')}?v={value}">
                        <option value="0">--请选择--</option>
                        <volist name="commend" id="co">
                        <option value="{$co.id}" <if condition="$co['id'] eq $va['commend_id']">selected</if>>{$co.name}</option>
                        </volist>
                    </select>
                </div>
                <div class="form-group">
                    <label class="x100">商品分类:</label>
                    <select name="category_id[]" data-toggle="selectpicker" multiple data-width="400" id="groy-type2">
                        <option value="">--请选择--</option>
                        <if condition="$va.category_ids neq null">
                        <volist name="va['category_ids']" id="vaa">
                        <option value="{$vaa.id}" <if condition="$vaa.ck eq '1'">selected</if>>{$vaa.name}</option>
                        </volist>
                        </if>
                        <!-- <volist name="res" id="ro">
                        <option value="{$ro.id}" <if condition="in_array($ro['id'],$va['category_ids'])">selected</if>>{$ro.name}</option>
                        </volist> -->
                    </select>
                </div>
                <div class="form-group place">
                    <label class="x100">场地坐标:</label>
                    <input type="text" name="east"  <if condition="$va.north neq null">value="{$va.east},{$va.north}"</if>/>
                    <span>注意：当类型为场地租赁的时候，此处必须要填。</span>
                    <span><a href="http://api.map.baidu.com/lbsapi/getpoint/index.html" target="_blank">获取经纬度</a></span>
                </div>
                <div class="form-group">
                    <label class="x100">服务城市:</label>
                    <select name="city_id[]" data-toggle="selectpicker" multiple data-width="400">
                        <option value="">--请选择--</option>
                        <volist name="city" id="to">
                        <option value="{$to.id}" <if condition="in_array($to['id'],$va['city_ids'])">selected</if>>{$to.name}</option>
                        </volist>
                    </select>
                </div>
                <div class="form-group">
                    <label class="x100">所属商家:</label>
                    <select name="sid" data-toggle="selectpicker">
                        <option value="0">--请选择--</option>
                        <volist name="shoplist" id="so">
                        <option value="{$so.id}" <if condition="$so['id'] eq $va['sid']">selected</if>>{$so.name}</option>
                        </volist>
                    </select>
                </div>
                <div class="form-group">
                    <label class="x100">产品品牌:</label>
                    <select name="brandid" data-toggle="selectpicker">
                        <option value="0">--请选择--</option>
                        <volist name="brandlist" id="bo">
                        <option value="{$bo.id}" <if condition="$bo['id'] eq $va['brandid']">selected</if>>{$bo.name}</option>
                        </volist>
                    </select>
                </div>
               <!--  <div class="form-group">
                    <label class="x100">所属类型:</label>
                    <volist name="commend" id="co">
                    <input type="radio" name="commend_id" value="{$co.id}" id="stssale2" data-toggle="icheck" data-label="{$co.name}" <if condition="$va['commend_id'] eq $co['id']">checked</if>  />
                    </volist>
                </div> -->
                <div class="form-group">
                    <label class="x100">商品状态:</label>
                    <input type="radio" name="status" value="0" id="pro_status1" data-toggle="icheck" data-label="上架"  <if condition="$va.status neq '1'">checked</if>  />
                    <input type="radio" name="status" value="1" id="pro_status2" data-toggle="icheck" data-label="下架"  <if condition="$va.status eq '1'">checked</if>  />
                </div>
                <!-- <div class="form-group">
                    <label class="x100">是否包邮:</label>
                    <input type="radio" name="bemail" id="pro_beamil1" data-toggle="icheck" data-label="是"  checked  />
                    <input type="radio" name="bemail" id="pro_beamil2" data-toggle="icheck" data-label="否"   />
                </div> -->
                
                <div class="form-group">
                    <label class="x100">权重:</label>
                    <input type="text" name="sort" value="{$va.sort}" data-toggle="spinner" data-min="0" data-step="1" data-rule="integer" class="w100"  />
                </div>
               <!--  <div class="form-group ">
                    <label class="x100">商品关键词:</label>
                    <input type="text" name="search_words" class="w500" value="{$va.search_words}"/>
                    <span class="text-warning">注:使用豆号分隔</span>
                </div> -->
                <div class="form-group clearfix">
                    <label class="x100 pull-left">商品图片:</label>
                    <div class="pull-left">
                        <!--多上传dom ,-->
                        <!-- data-name   hidden的name    组合后 name[] -->
                        <div class="multimg clearfix" data-name="photo">
                            <if condition="$va.photo neq null">
                               <volist name="va['photo']" id="po">
                                  <div class="pull-left"><img src="{$po}" width="70"><input type="hidden" name="photo[]" value="{$po}"><p class="text-center"><a href="javascript:void(0)" class="remove">删除</a></p></div>
                               </volist>
                            </if>
                        </div>
                        <span data-toggle="upload"
                        data-uploader="{:U('Index/upload')}"
                         data-file-type-exts="*.png;*.jpg"
                         data-icon="cloud-upload"
                         data-multi="true"
                         data-on-upload-success="upload_multi_callback"
                         data-auto="true"
                         data-button-text="上传图片"
                        ></span>
                        <span>注：第一张图片为主图</span>
                    </div>
                </div>
            </div>
            <div class="tab-pane fade" id="pro_content"></div>
            <div class="tab-pane fade" id="pro_attr"></div>
            <div class="tab-pane fade" id="pro_aftersale"></div>
        </div>




    </form>
</div>
<script>
$(function () {
   $('.multimg').on('click', 'a.remove', function () {
        $(this).parents('div.pull-left').eq(0).remove();
   });
});
</script>
<include file="Common/footer" ftype="save" />